/*
 *  Copyright 2016 http://www.kedacomframework.org
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
package com.kedacom.ctsp.authority.entity;

import com.kedacom.ctsp.web.entity.*;

import java.util.Set;

/**
 * 部门 实体
 *
 * @author sun
 */
public interface Department extends CrudEntity<String>, TreeSortSupportBean<Department, String>, StatefulBean<Integer>, CreatorRecordableBeanWithCode, UpdaterRecordableBeanWithCode, ExtendedBean {
 /*-------------------------------------------
    |               属性名常量               |
    ===========================================*/
    /**
     * 名称
     */
    String NAME = "name";
    /**
     * 部门编码
     */
    String CODE = "code";
    /**
     * 状态
     */
    String STATUS = "status";
    /**
     * 根据parentId查询
     */
    String PARENT_ID = "parent.id";

    /**
     * 单位级别
     */
    String GRADE = "grade";
    /***
     * 单位类型
     */
    String TYPE = "type";

    /**
     * @return 名称
     */
    String getName();

    /**
     * 设置 名称
     */
    void setName(String name);

    /**
     * 区域id
     *
     * @return
     */
    String getDistrict();

    void setDistrict(String district);

    /**
     * 全称
     *
     * @return
     */
    String getFullName();

    void setFullName(String fullName);

    /**
     * @return 部门编码
     */
    String getCode();

    /**
     * 设置 部门编码
     */
    void setCode(String code);

    /**
     * @return 说明
     */
    String getDescription();

    /**
     * @param description 说明
     */
    void setDescription(String description);


    /**
     * @return 部门的角色
     */
    Set<Role> getRoles();

    void setRoles(Set<Role> roles);

    /**
     * 单位级别
     *
     * @return
     */
    String getGrade();

    /**
     * 单位级别
     *
     * @param grade
     */
    void setGrade(String grade);

    /**
     * 单位类型
     *
     * @return
     */
    String getType();

    /**
     * 单位类型
     *
     * @param type
     */
    void setType(String type);

    String getCreatorCode();

    void setCreatorCode(String var1);

    Long getCreateTime();

    void setCreateTime(Long var1);

    String getUpdaterCode();

    void setUpdaterCode(String var1);

    Long getUpdateTime();

    void setUpdateTime(Long var1);

    default void setCreateTimeNow() {
        this.setCreateTime(System.currentTimeMillis());
    }

    default void setUpdateTimeNow() {
        this.setUpdateTime(System.currentTimeMillis());
    }
}